package com.xuln.framework.entity;

import java.io.Serializable;
import java.util.Locale;

import javax.persistence.Column;

public class PrimaryKey implements Serializable {
	private static final long serialVersionUID = 6547298720107621556L;
	@Column(nullable = false)
	private Long id;
	@Column(length = 5, nullable = false)
	private String locale;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLocale() {
		return locale;
	}

	public void setLocale(String locale) {
		this.locale = locale;
	}

	public PrimaryKey() {
	}

	public PrimaryKey(Long id, String locale) {
		super();
		this.id = id;
		this.locale = locale;
	}

	public PrimaryKey(String locale) {
		this.locale = locale;
	}

	public PrimaryKey(Locale locale) {
		this.locale = locale.toString();
	}

	public PrimaryKey(Long categoryId, Locale locale) {
		this.id = categoryId;
		this.locale = locale.toString();
	}

}
